Changing default font size in doors through DXL (setDefaultColorScheme)

Hello,

I changed the default font for doors via setDefaultColorScheme. It made my font smaller. How can I increase the font size slightly though a DXL command?

I tried using different values in setDefaultColorScheme(int) however, although it does seem to have an effect on the font family it does not seem to modify the font size.

Any suggestions?
PatrickGuay - Tue Apr 24 15:08:23 EDT 2012

Re: Changing default font size in doors through DXL (setDefaultColorScheme)
Peter_Albert - Tue Apr 24 15:24:55 EDT 2012

Use "setFontSettings"

Regards,

Peter
 

// Modify the font size for displayed text
/*
*/
if (null current Module){halt}
// ----------------------------------------------------------------------
DB  fontSizeDB
int maxLevel = 10
// ----------------------------------------------------------------------
void increaseFont(DB db)
{
  int iLevel
  int iSize = 0, iFamily = 0
  bool bBold = null, bItalic = null
  for iLevel in 1:maxLevel do
  {
    getFontSettings(iLevel, TextFont, iSize, iFamily, bBold, bItalic)
    iSize++
    if (iSize == 6){iSize = 5}
    setFontSettings(iLevel, TextFont, iSize, iFamily, bBold, bItalic)
  }
  refreshExplorer(current Module)
  refresh current Module
}
// ----------------------------------------------------------------------
void decreaseFont(DB db)
{
  int iLevel
  int iSize = 0, iFamily = 0
  bool bBold = null, bItalic = null
  for iLevel in 1:maxLevel do
  {
    getFontSettings(iLevel, TextFont, iSize, iFamily, bBold, bItalic)
    iSize--
    if (iSize == 0){iSize = 1}
    setFontSettings(iLevel, TextFont, iSize, iFamily, bBold, bItalic)
  }
  refreshExplorer(current Module)
  refresh current Module
}
// ----------------------------------------------------------------------
fontSizeDB = create("Set font size")
apply(fontSizeDB, "+", increaseFont)
apply(fontSizeDB, "-", decreaseFont)
show fontSizeDB

Re: Changing default font size in doors through DXL (setDefaultColorScheme)
PatrickGuay - Tue Apr 24 15:40:20 EDT 2012

Although the GUI you supplied me works the effect of the font size does not change. It seems that the fact that I have played with the defaultColorScheme seems to have made cancelled setFontSettings effects. Is this possible?